{$msg}
| # | الكود | الحساب | رصيد اول المدة | {foreach $months as $month}{$month} | {/foreach}الاجمالى | قيم ميزان المراجعه | رصيد الشجره | قيم البرنامج | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| مدين | دائن | {foreach $months as $month}مدين | دائن | {/foreach}مدين | دائن | مدين | دائن | مدين | دائن | ||||
| {$i} | {$data->layingOrder} | {$data->customName} | {$data->firstPeriodDebtor} | {$data->firstPeriodCreditor} | {assign var=totMonthsDebt value=$data->firstPeriodDebtor} {assign var=totMonthsCredit value=$data->firstPeriodCreditor} {assign var=m value=1} {foreach $months as $month}{$data->theValue2[$month]['debt']} | {$data->theValue2[$month]['credit']} | {assign var=m value=$m+1} {assign var=totMonthsDebt value=$totMonthsDebt+$data->theValue2[$month]['debt']} {assign var=totMonthsCredit value=$totMonthsCredit+$data->theValue2[$month]['credit']} {/foreach}{$totMonthsDebt} | {$totMonthsCredit} | {assign var=calcBalance value=0}{if $totMonthsDebt > $totMonthsCredit} {$totMonthsDebt-$totMonthsCredit} {if $data->islastLeaf == 1} {assign var=netDebt value=$netDebt + ($totMonthsDebt-$totMonthsCredit)}{assign var=calcBalance value=$totMonthsDebt-$totMonthsCredit} {/if} {if (($showClientsAtTree == 0 && ($data->id == 58 || $data->id == 60)) || ($showSuppliersAtTree == 0 && ($data->id == 81 || $data->id == 87))) } {assign var=netDebt value=$netDebt + ($totMonthsDebt-$totMonthsCredit)} {assign var=calcBalance value=$totMonthsDebt-$totMonthsCredit} {/if} {/if} | {if $totMonthsCredit > $totMonthsDebt} {$totMonthsCredit-$totMonthsDebt} {if $data->islastLeaf == 1}{assign var=netCredit value=$netCredit + ($totMonthsCredit-$totMonthsDebt)}{assign var=calcBalance value=$totMonthsCredit-$totMonthsDebt}{/if} {if (($showClientsAtTree == 0 && ($data->id == 58 || $data->id == 60)) || ($showSuppliersAtTree == 0 && ($data->id == 81 || $data->id == 87))) } {assign var=netCredit value=$netCredit + ($totMonthsCredit-$totMonthsDebt)} {assign var=calcBalance value=$totMonthsCredit-$totMonthsDebt} {/if} {/if} | theValue) || ($data->accountNature == 0 && $data->theValue > 0 && $totMonthsCredit > $totMonthsDebt) || ($data->accountNature == 1 && $data->theValue > 0 && $totMonthsCredit < $totMonthsDebt) }style="color:red"{/if}> {if $data->islastLeaf == 1 } {if $data->accountNature == 0 && $data->theValue >= 0 || $data->accountNature == 1 && $data->theValue <= 0}{abs($data->theValue)} {assign var=sumDebt2 value=$sumDebt2+abs($data->theValue)} {/if} {/if} {if (($showClientsAtTree == 0 && ($data->id == 58 || $data->id == 60)) || ($showSuppliersAtTree == 0 && ($data->id == 81 || $data->id == 87))) } {if $data->accountNature == 0 && $data->theValue >= 0 || $data->accountNature == 1 && $data->theValue <= 0}{abs($data->theValue)} {assign var=sumDebt2 value=$sumDebt2+abs($data->theValue)} {/if} {/if} | theValue) || ($data->accountNature == 0 && $data->theValue > 0 && $totMonthsCredit > $totMonthsDebt) || ($data->accountNature == 1 && $data->theValue > 0 && $totMonthsCredit < $totMonthsDebt) }style="color:red"{/if} class="borderleft"> {if $data->islastLeaf == 1 } {if $data->accountNature == 1 && $data->theValue > 0 || $data->accountNature == 0 && $data->theValue < 0}{abs($data->theValue)} {assign var=sumCredit2 value=$sumCredit2+abs($data->theValue)} {/if} {/if} {if (($showClientsAtTree == 0 && ($data->id == 58 || $data->id == 60)) || ($showSuppliersAtTree == 0 && ($data->id == 81 || $data->id == 87))) } {if $data->accountNature == 1 && $data->theValue > 0 || $data->accountNature == 0 && $data->theValue < 0}{abs($data->theValue)} {assign var=sumCredit2 value=$sumCredit2+abs($data->theValue)} {/if} {/if} | {$data->theValue3} |
| الاجــمــالــى | {$totalsArr['firstPeriodDebtor']} | {$totalsArr['firstPeriodCreditor']} | {assign var=allDebtTot value=$totalsArr['firstPeriodDebtor']} {assign var=allCreditTot value=$totalsArr['firstPeriodCreditor']} {assign var=m value=1} {foreach $months as $month}{$totalsArr[{$month}]['debt']} | {$totalsArr[{$month}]['credit']} | {assign var=allDebtTot value=$allDebtTot + {$totalsArr[{$month}]['debt']}} {assign var=allCreditTot value=$allCreditTot + {$totalsArr[{$month}]['credit']}} {assign var=m value=$m+1} {/foreach}{$allDebtTot} | {$allCreditTot} | {$netDebt} | {$netCredit} | {$sumDebt2} | {$sumCredit2} | {$sumProgram} | ||